description: &str, extra: &[u8],
partial: bool) -> ham::MatchResult {
let out = match expected {
- Some(out) => substitute_macros(out),
+ Some(out) => out,
None => return ham::success(),
};
let actual = match str::from_utf8(actual) {
}
pub fn lines_match(expected: &str, mut actual: &str) -> bool {
+ let expected = substitute_macros(expected);
for (i, part) in expected.split("[..]").enumerate() {
match actual.find(part) {
Some(j) => {
[COMPILING] foo v0.0.1 ([..])
[RUNNING] `rustc build.rs [..]`
[RUNNING] `[..]build-script-build`
-[RUNNING] `rustc src[..]main.rs [..]`
+[RUNNING] `rustc src[/]main.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
execs().with_status(0)
.with_stderr("\
[DOCUMENTING] foo v0.0.1 ([..])
-[RUNNING] `rustdoc src[..]lib.rs [..]`
+[RUNNING] `rustdoc src[/]lib.rs [..]`
"));
}
"bin"
],
"name": "foo",
- "src_path": "src[..]foo.rs"
+ "src_path": "src[/]foo.rs"
}
],
"features": {},
{
"kind": [ "lib" ],
"name": "bar",
- "src_path": "[..]bar[..]src[..]lib.rs"
+ "src_path": "[..]bar[/]src[/]lib.rs"
}
],
"features": {},
- "manifest_path": "[..]bar[..]Cargo.toml"
+ "manifest_path": "[..]bar[/]Cargo.toml"
},
{
"name": "baz",
{
"kind": [ "lib" ],
"name": "baz",
- "src_path": "[..]baz[..]src[..]lib.rs"
+ "src_path": "[..]baz[/]src[/]lib.rs"
}
],
"features": {},
- "manifest_path": "[..]baz[..]Cargo.toml"
+ "manifest_path": "[..]baz[/]Cargo.toml"
}
],
"workspace_members": ["baz 0.5.0 (path+file:[..]baz)", "bar 0.5.0 (path+file:[..]bar)"],
{
"kind": [ "lib" ],
"name": "bar",
- "src_path": "[..]bar[..]src[..]lib.rs"
+ "src_path": "[..]bar[/]src[/]lib.rs"
}
],
"features": {},
- "manifest_path": "[..]bar[..]Cargo.toml"
+ "manifest_path": "[..]bar[/]Cargo.toml"
},
{
"name": "baz",
{
"kind": [ "lib" ],
"name": "baz",
- "src_path": "[..]baz[..]src[..]lib.rs"
+ "src_path": "[..]baz[/]src[/]lib.rs"
}
],
"features": {},
- "manifest_path": "[..]baz[..]Cargo.toml"
+ "manifest_path": "[..]baz[/]Cargo.toml"
}
],
"workspace_members": ["baz 0.5.0 (path+file:[..]baz)", "bar 0.5.0 (path+file:[..]bar)"],
"targets":[{
"kind":["bin"],
"name":"foo",
- "src_path":"src[..]foo.rs"
+ "src_path":"src[/]foo.rs"
}],
"features":{},
"manifest_path":"[..]Cargo.toml"
assert_that(p.cargo("package").arg("-l"),
execs().with_status(0).with_stdout("\
Cargo.toml
-src[..]main.rs
+src[/]main.rs
"));
assert_that(p.cargo("package"),
execs().with_status(0).with_stdout(""));
"targets":[{
"kind":["bin"],
"name":"foo",
- "src_path":"src[..]foo.rs"
+ "src_path":"src[/]foo.rs"
}],
"features":{},
"manifest_path":"[..]Cargo.toml"